#define _CRT_SECURE_NO_WARNINGS 1
#include"SparseMatrix.h"
int main()
{
    cout << "1.创建稀疏矩阵三元组a和b" << endl;
    TSMatrix a, b;
    ElemType arr1[ROW][COL] = { {1,0,3},{0,1},{0,0,1},{0,0,1,1} };
    ElemType arr2[ROW][COL] = { {3},{0,4},{0,0,1},{0,0,0,2} };
    CreateMat(a, arr1,ROW,COL);
    CreateMat(b, arr2,ROW,COL);
    //转置
    TSMatrix t1;
    TranTat(a, t1);
    cout << "2.a的转置矩阵三元组t1为：" << endl;
    DispMat(t1);
    //加法
    TSMatrix t2;
    AddMat(a, b, t2);
    cout << "3.a+b：" << endl;
    DispMat(t2);
    //乘法
    TSMatrix t3;
    MulMat(a, b, t3);
    cout << "4.a*b:" << endl;
    DispMat(t3);
    cout << "231322002 涂瑞晨" << endl;
    time_t nowtime;
    time(&nowtime);
    tm* p = localtime(&nowtime);
    printf("%04d;%02d;%02d %02d;%02d;%02d", p->tm_year + 1900, p->tm_mon + 1, p->tm_mday, p->tm_hour, p->tm_min, p->tm_sec);
    return 0;
}